package com.topscore.uke.entities;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by 71468 on 2018/3/24.
 */

public class MemberTagValue implements Parcelable {

    /**
     * label : 努力工作只为生活质量
     * sort : 10
     * value : 1
     */

    private String label;
    private int sort;
    private String value;

    private boolean isSelected = false;

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.label);
        dest.writeInt(this.sort);
        dest.writeString(this.value);
        dest.writeByte(this.isSelected ? (byte) 1 : (byte) 0);
    }

    public MemberTagValue() {
    }

    protected MemberTagValue(Parcel in) {
        this.label = in.readString();
        this.sort = in.readInt();
        this.value = in.readString();
        this.isSelected = in.readByte() != 0;
    }

    public static final Parcelable.Creator<MemberTagValue> CREATOR = new Parcelable.Creator<MemberTagValue>() {
        @Override
        public MemberTagValue createFromParcel(Parcel source) {
            return new MemberTagValue(source);
        }

        @Override
        public MemberTagValue[] newArray(int size) {
            return new MemberTagValue[size];
        }
    };
}
